<template>
  <div>
    <step1 v-if="active === 1" @change-step="handleSetStep"></step1>
    <step2
      v-if="active === 2"
      :info-data="form"
      @change-step="handleSetStep"
    ></step2>
  </div>
</template>

<script>
  import Step1 from './components/index'
  import Step2 from './components/RoleEdit'
  export default {
    name: 'Pay',
    components: { Step1, Step2 },
    data() {
      return {
        active: 1,
        form: {},
      }
    },
    methods: {
      handleSetStep(active, form) {
        this.active = active
        if (form) this.form = Object.assign(this.form, form)
      },
    },
  }
</script>
<style lang="scss" scoped></style>
